package com.whnk.model.controller;

import com.whnk.common.core.web.controller.BaseController;
import com.whnk.common.core.web.page.TableDataInfo;
import com.whnk.common.security.annotation.PreAuthorize;
import com.whnk.model.domain.Product;
import com.whnk.model.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/workFlow/processDefinition/")
public class ProductController extends BaseController {

    @Autowired
    private IProductService productService;

    @PreAuthorize(hasPermi = "model:product:list")
    @GetMapping("/productIdList")
    public TableDataInfo list(){
        List<Product> list = productService.selectProduct();
        return getDataTable(list);
    }

}
